#ifndef _MAC_MESSAGE_HPP
#define _MAC_MESSAGE_HPP 1

#include "VerifiedMessageBase.hpp"
#include "MacBytes.hpp"

namespace BFT
{
	namespace messages
	{
		class MacMessage : public VerifiedMessageBase
		{
			public:
			
			MacMessage(uint32_t _tag, uint32_t _size, uint32_t _sender);
			
			MacMessage(boost::shared_ptr<char> _bytes , int _bytes_size);
			
			uint32_t getSender(); //inlined
			
			static int computeAuthenticationSize();
			
			static int actualAuthenticationSize();
			
			boost::shared_ptr<MacBytes> getMacBytes();
			
			void setMacBytes(boost::shared_ptr<MacBytes> _mb);
			
			protected:
			
			uint32_t sender;
		};
		
		inline uint32_t MacMessage::getSender() {return sender;}
	}
}

#endif
